package org.devgframwork.web.test.service;

import com.github.pagehelper.PageHelper;
import org.devgframwork.platform.model.ResultModel;
import org.devgframwork.web.test.dao.TestMapper;
import org.devgframwork.web.test.entity.Test;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author duheng
 * @Date 2021/10/15 13:34
 */
@Service
public class MyTestService {

    @Resource
    private TestMapper testMapper;

    //	@Cacheable(value = "cache:devgweb",key = "#test.loginName")

    public ResultModel service2ImplList(Test test) {
        PageHelper.startPage(test.getPageIndex(), test.getPageSize());
        List<Map<String, Object>> result = testMapper.list(test);
        return ResultModel.newSuccess(result);
    }

    public ResultModel service3ImplList(Test test) {
        PageHelper.startPage(test.getPageIndex(), test.getPageSize());
        List<Map<String, Object>> result = testMapper.list(test);
        return ResultModel.newSuccess(result);
    }

}
